package org.fireflow2.designer.eclipse.policies;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.ComponentEditPolicy;
import org.eclipse.gef.requests.GroupRequest;
import org.fireflow2.designer.eclipse.commands.workflownode.DeleteWorkflowNodeCommand;
import org.fireflow2.designer.eclipse.modelwrapper.NodeWrapper;



public class NodeEditPolicy extends ComponentEditPolicy {
    protected Command createDeleteCommand(GroupRequest deleteRequest) {
        DeleteWorkflowNodeCommand deleteCommand=new DeleteWorkflowNodeCommand();
        NodeWrapper nodeWrapper = (NodeWrapper)this.getHost().getModel();
        deleteCommand.setNodeWrapper(nodeWrapper);
        deleteCommand.setParentWrapper(nodeWrapper.getParent());
        return deleteCommand;
    }
}
